import { Component, OnInit } from "@angular/core";
import { Router } from '@angular/router';
import { ApiService } from 'src/app/core/api';
import { MessageService } from 'src/app/core/service/message.service';


@Component({
    templateUrl: "./redTeam.html",
    styleUrls: ["./redTeam.scss"]
})
export class RedTeamComponent implements OnInit {
    pdfSrc='http://139.196.218.92:4224/assets/img/logo/645-2006.pdf';
    isShowList=true;
    selTitle='';
    selDelTitle='';
    isShowWz=false;
    selectedTags = [];
    sharchTags = ['全部 ', '国家标准', '行业标准', '地方标准', '国际标准', '国外标准', '示范试点', '重点工程', '技术委员会'];
    sharchTags3 = [' 全部', '工业信息化部 ', '公安部', '国家密码管理局'];
    sharchTags4 = ['全部   ', '近一个月', '近三个月', '近半年', '近一年', '近两年', '近三年'];
    sharchTags5 = ['全部', '现行', '有更新版', '废止'];
    sharchTags2 = ['安全防范工程系统', '入侵报警类', '视频监控类', '道路交通类', '出入口控制类', '反恐防爆安检类', '生物识别类', '侦查防护类', '电磁兼容类', '电气安全类', '实体防护类',
        '警用装备类',
        '可靠性试验类',
        '信息安全类',
        '公安专用类',
        '软件类',
        '智能联网类',
        '信息系统'
    ];
    selItem ;
    marks: any = {
        0: '发布于2014/9/9',
        50: '实施于2014/12/1',
        100: {
          style: {
            color: '#f50'
          },
          label: '<strong>废止</strong>'
        }
      };
    page = { 
        "beginTime": "",
        "endTime": "",
        "ministryId": "",
        "pageNo": "1",
        "standardStatus": ""
    };
    list:any;
    sharchTagsUrl = ['/member/center/home/index', '/member/center/home/myProject', 'member/center/home/bzwx', '平台服务'];
    current = 1;
    isVisible=true;
    constructor(
        private message: MessageService,
        private router: Router,
        private api: ApiService
    ) { }

    ngOnInit() {
        this.message.setBreadcrumb({
            breadcrumbs: [
                { name: '标准文献' }
            ]
        });
        this.getList();
    }
    handleChange(checked: boolean, tag: string, index: string) {
        if (checked) {
            this.selectedTags[0] = tag;
            this.isShowList=true;
            this.isShowWz=true;
        } else {
            // this.selectedTags = this.selectedTags.filter(t => t !== tag);
            // this.sharchData.vulnerabilityTypeId = '';
        }
    }
    onItemChecked(item) {
        if(item == this.list[0] && item.name == '视频安防监控系统变速球型摄像机' ){
            this.isShowList = false
        }
    }
    isShowMsgWindow=false;
    colseWindow(){
        this.isShowMsgWindow = false;
    }
    getList(){
        this.api.post('标准文献列表', this.page).then((res: any) => {
            console.log(res)
        })
        
    }
}
